import { http } from '@/utils/http/axios';

/**
 * @description: 参数配置列表
 */
export function getSystemParams(params) {
  return http.request({
    url: '/moss-cloud-base/base/systemConfig/getConfigs',
    method: 'POST',
    data: params,
  });
}
/**
 * @description: 保存参数配置
 */
export function saveOrUpdate(params) {
  return http.request({
    url: '/moss-cloud-base/base/systemConfig/saveOrUpdate',
    method: 'POST',
    data: params,
  }, {
    isTransformResponse: false,
  });
}
/**
 * @description: 删除配置项
 */
export function deleteSystemConfig(params) {
  return http.request({
    url: '/moss-cloud-base/base/systemConfig/delete',
    method: 'POST',
    data: params,
  },
    {
      isTransformResponse: false,
    });
}
/**
 * @description: 刷新配置缓存
 */
export function loadSystemConfig() {
  return http.request({
    url: '/moss-cloud-base/base/systemConfig/loadSystemConfig',
    method: 'POST',
    data: {},
  },{
    isTransformResponse: false,
  });
}

/**
 * @description: 查看密码
 */
export function showPasswordApi(params) {
  return http.request({
    url: '/moss-cloud-base/base/systemConfig/showPassword',
    method: 'POST',
    data: params,
  });
}

/**
 * @description: 更新配置值
 */
export function updateValue(params) {
  return http.request({
    url: '/moss-cloud-base/base/systemConfig/updateValue',
    method: 'POST',
    data: params,
  },{
    isTransformResponse: false,
  });
}
